package model

import (
	"time"
)

type RuleCustomersType struct{
	RuleCustomersTypeId int `xorm:"pk autoincr"`
	CustomersTypeId int
	RuleId int
	OrderInterval int
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (rct *RuleCustomersType) QueryRuleCustomersTypeByCustomersType(ctId int, rId int)*RuleCustomersType{
	var rctv *RuleCustomersType
	_, err := x.Where("customers_type_id = ?", ctId).And("Rule_id = ?", rId).Get(rctv)
	if err != nil{
		return nil
	}
	return rctv
}